#ifndef _YEP_APPLICATION_APPLICATION_HPP
#define _YEP_APPLICATION_APPLICATION_HPP

#include "../common.hpp"
#include <vector>
#include <memory>

namespace yep
{
    class Scene; // Foward declaration.

    /**
     * @brief Base class for all applications.
     *
     * It describes all the sub-programs for this project, except the engine and application tests, which tests
     *  the systems below this. Every final application should be singleton and created staticly.
     **/
    class Application
    {
    public:
        Application(const string &name_, const string &description_);
        virtual ~Application();

        /**
         * @brief Returns the name
         **/
        const string &getName( void ) const
        {
            return name;
        }

        /**
         * @brief Returns the description
         **/
        const string &getDescription( void ) const
        {
            return description;
        }

        /**
         * @brief Return the first scene of the application.
         *
         *  Other scenes can be called later by this scene, even changing
         *   the main scene.
         **/
        virtual Scene &getFirstScene() = 0;

        /**
         * @brief Returns the applications
         **/
        static vector<Application*> &getApplications();

    private:
        string name;
        string description;
        static vector<Application*> applications;

        friend class ApplicationScene;
    };

}

#endif // _YEP_APPLICATION_APPLICATION_HPP

